package com.lovo.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class AdminControlInvocation implements InvocationHandler {
    private AdminControl target;
    public AdminControlInvocation(AdminControl target){
        this.target = target;
    }
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("进入方法"+method.getName());
        Object object = method.invoke(target,args);
        System.out.println("退出方法"+method.getName());
        return object;
    }
}
